/*
 * http_exception.hpp
 *
 *  Created on: Apr 10, 2011
 *      Author: daniel
 */

#ifndef HTTP_EXCEPTION_HPP_
#define HTTP_EXCEPTION_HPP_

#include <exception>

namespace doeplus{ namespace webapp{

class http_exception : public std::exception {

private:
	int _error_code;
	const char *_error_msg;
public:

	http_exception(int error_code,const char* error_msg) : _error_code(error_code),_error_msg(error_msg){
	}

    virtual const char* what() const throw(){
    	return this->_error_msg;
    }

    int error_code(){
    	return this->_error_code;
    }

};

} }

#endif /* HTTP_EXCEPTION_HPP_ */
